CountSubControls
NEW WITH THE APPEARANCE MANAGER
Returns the number of embedded controls within a control.
pascal OSErr CountSubControls ( ControlHandle inControl, SInt16* outNumChildren);
inControl
- On input, a handle to a control whose embedded controls you wish to count.
outNumChildren
- On output, a pointer to an integer representing the number of embedded subcontrols.
- function result
- A result code; see "Result Codes". The result code
errControlIsNotEmbedder
indicates that the specified control does not support embedding. The resulterrNoRootControl
indicates that embedding is not enabled for that window.DISCUSSION
TheCountSubControls
function is useful for iterating over the control hierarchy. You can use the count produced to determine how many subcontrols there are and then callGetIndexedSubControl
to get each.SEE ALSO
"Embedding Controls"."Appearance Manager Gestalt Selector Constants".